#! /usr/bin/env bash
# 检测编译环境

set -e

UNAME_S=$(uname -s)
UNAME_SM=$(uname -sm)
echo "build on $UNAME_SM"

echo "ANDROID_NDK=$ANDROID_NDK"
echo "ANDROID_SDK=$ANDROID_SDK"

if [[ -z "$ANDROID_NDK" ]]; then
    echo "You must define ANDROID_NDK before starting."
    echo "They must point to your NDK directories."
    echo ""
    exit 1
fi

export NDK_GCC_VER=4.9
export NDK_GCC_64_VER=4.9
export NDK_MIN_API=16
# export NDK_TOOLCHAIN=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64
export PATH=${ANDROID_SDK}/tools:$PATH